class Notifier < ActionMailer::Base

  def new_comment(comment)
    email_addresses = %{llleelay@gmail.com}
    email_addresses << ", #{comment.comment.email}" unless comment.comment.nil?
    recipients email_addresses
    from "Lilei's <lilei@llleelay.com>"
    if email_addresses == %{llleelay@gmail.com}
      subject "[LiLei's] New Comment on '#{comment.post.title}'"
    else
      subject "[LiLei's] Your Comment on '#{comment.post.title}' has been replyed"
    end
    body :comment => comment
  end  

end
